-- creator   xiongv
-- date      2023-05-29
-- 功能       虚假揽收日报
-- 依赖表     jms_dm__dm_waybill_false_taking_dt

drop table if exists jms_dm.dm_waybill_false_taking_network_dt  ;
create external table if not exists jms_dm.dm_waybill_false_taking_network_dt(
    taking_date                             string comment '揽收日期'
    , receive_network_code                  string comment '收件网点code'
    , receive_network_name                  string comment '收件网点名称'
    , receive_agent_code                    string comment '收件代理区code'
    , receive_agent_name                    string comment '收件代理区名称'
    , receive_virt_agent_code               string comment '虚拟收件代理区code'
    , receive_virt_agent_name               string comment '虚拟收件代理区名称'
    , qxt_false_taking_cnt                  bigint comment '七星潭虚假揽收票数'
    , thd_false_taking_cnt                  bigint comment '桃花岛虚假揽收票数'
    , xyf_false_taking_cnt                  bigint comment '逍遥峰虚假揽收票数'
    , zjs_false_taking_cnt                  bigint comment '紫金山虚假揽收票数'
    , receive_network_false_taking_cnt              bigint comment '虚假揽收票数'
    , receive_network_should_hand_in_cnt            bigint comment '网点全部应交件票数'
    , receive_network_platform_should_hand_in_cnt   bigint comment '网点四大平台应交件票数'
    , network_qxt_should_hand_in_cnt                bigint comment '七星潭应交件票数'
    , network_thd_should_hand_in_cnt                bigint comment '桃花岛应交件票数'
    , network_xyf_should_hand_in_cnt                bigint comment '逍遥峰应交件票数'
    , network_zjs_should_hand_in_cnt                bigint comment '紫金山应交件票数'
) comment '经营指标-虚假揽收网点汇总'
partitioned by (dt string comment '分区日期')
stored as parquet
location '/dw/hive/jms_dm.db/external/dm_waybill_false_taking_network_dt'
tblproperties (
    'discover.partitions'='false',
    'parquet.column.index.access'='true'
);
